package com.gzhryc.shared_device.cdcz.code;

import com.gzhryc.shared_device.base.models.OperateInfo;
import com.gzhryc.shared_device.cdcz.code.dao.db.CDCZOrder;
import com.gzhryc.shared_device.cdcz.core.models.CDCZChargeCloseNotify;

public interface ICDCZBusinessEventListener {

    /**
     * 收费检查
     * @param tradeNo
     * @param nowPower      当前电压
     * @param nowCurrent    当前电流
     * @param electricity   当前电量
     * @param chargedTime   当前充电时长
     * @param operateInfo
     * @return  0:正常，1:关闭
     */
    public int chargeCheck(String tradeNo, Double nowPower, Double nowCurrent, Double electricity, Integer chargedTime, OperateInfo operateInfo);

    /**
     * 充电开始
     * @param deviceOrder
     */
    public void chargeStart(CDCZOrder deviceOrder);

    /**
     * 完成充电
     * @param deviceOrder
     */
    public void finishCharge(CDCZOrder deviceOrder, CDCZChargeCloseNotify chargeCloseNotify,OperateInfo operateInfo);

}
